unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  Androidapi.JNI.jinteger.jinteger;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

uses
  Androidapi.Helpers,
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.sample.Sample;

procedure TForm1.Button1Click(Sender: TObject);
var
  AJObj: JSample;
  AStr: string;

  JSTR: JString;
  JINT: JInteger;

  JJINT:Jjinteger;
begin
  AJObj := TJSample.JavaClass.init;
  AStr := JStringToString(AJObj.getString);
  ShowMessage(AStr);

  JSTR := TJString.JavaClass.init;
  JSTR := StringToJString('{078873A2-F2A7-11E3-A427-C15AB279B48E}');
  ShowMessageFmt('%D',[JSTR.hashCode]);

  JJINT:=TJjinteger.JavaClass.init;
  ShowMessageFmt('%S',[JStringToString(JJINT.toString(161,9))]);






end;

end.
